<!DOCTYPE html>
<html lang="ZH-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title  th:text="${sysName}">Login</title>
    <link rel="stylesheet" href="assets/layui/css/layui.css" th:href="@{/assets/layui/css/layui.css}" >
    <link rel="stylesheet" href="css/login.css" th:href="@{/css/login.css}" >
    <style>
        html,body{
            background: url(images/loginbg.png) no-repeat 1px 0;
            width:100%;
            height: 100%;
            background-size: 100% 100%;
        }
        input{
            height: 20px;
            background: rgba(255,255,255,0.8);
            padding: 10px;
            border: 0;
            border-radius: 5px;
            width:calc(100% - 56px);
        }
        .kit-login-row{
            margin-top: 10px;
        }
    </style>
</head>

<body>
    <div style="position: absolute;left:0;right:0;bottom:0;top:0; background: rgba(0,0,0,0.3)">
        <div style="text-align: center;color: #fff;font-size: 24px;line-height: 48px;font-weight: 500;margin-top: 30px;">
            <h2 class="kit-login-slogan">欢迎使用 <br> <span th:text="${sysName}">xxx系统</span></h2>
        </div>
        <div style="margin-top: 30px;color:#fff; text-align: center">
            <div style="display:inline-block;margin: auto;background: rgba(0,0,0,0.5);border-radius: 10px;padding: 20px;text-align: left;width:280px;">
                <div style="color:#fff;text-align: center;font-size: 16px;">登录</div>
                <form class="layui-form" method="post" action="login">
                    <div class="kit-login-row">
                        <div class="kit-login-col" th:if="${error}">
                            <div class="layui-bg-orange" ><i th:text="${error}"></i></div>
                        </div>
                    </div>
                    <div class="kit-login-row">
                        <div class="kit-login-col">
                            <i class="layui-icon">&#xe612;</i>
                            <span class="kit-login-input">
                            <input type="text" id="userid" name="username" lay-verify="required" placeholder="用户名" />
                        </span>
                        </div>
                        <div class="kit-login-col"></div>
                    </div>
                    <div class="kit-login-row">
                        <div class="kit-login-col">
                            <i class="layui-icon">&#xe673;</i>
                            <span class="kit-login-input">
                            <input type="password" name="password" lay-verify="required" placeholder="密码" />
                          </span>
                        </div>
                        <div class="kit-login-col"></div>
                    </div>
                    <!--<div class="kit-login-row">-->
                        <!--<div class="kit-login-col">-->
                            <!--<i class="layui-icon">&#xe64c;</i>-->
                            <!--<span class="kit-login-input" style="width: 130px;vertical-align: middle;height: 40px">-->
                        <!--<input type="text" placeholder="验证码"  name="verCode" value="" style=" width:calc(100% - 180px);">-->
                         <!--</span>-->
                            <!--<img src="patchcaimg" id="imgVerCode" alt="点击刷新" style="height: 40px;opacity:0.9;filter:alpha(opacity=90);border-radius: 5px;">-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="kit-login-row">-->
                        <!--<div class="kit-login-col">-->
                            <!--<input type="checkbox" name="rememberMe" title="记住帐号" lay-skin="primary">-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="kit-login-row" style="text-align: center;padding-top: 20px;">
                        <button class="layui-btn kit-login-btn" style="width: 245px;" lay-submit="submit" lay-filter="login_hash">登录</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
<script src="assets/layui/layui.js" th:src="@{/assets/layui/layui.js}"></script>
<script src="assets/polyfill.min.js" th:src="@{/assets/polyfill.min.js}"></script>
<script>
    layui.use(['layer', 'form'], function() {
        var form = layui.form,
            $ = layui.jquery;

        //检查是否iframe中子页面
        if (window.top!= window.self) {
            window.top.location.href = location.href;
        }
        document.getElementById("userid").focus();

        $("#imgVerCode").click(function() {
            $("#imgVerCode").attr('src','patchcaimg?'+Math.random());
        });
    });
</script>
</body>

</html>